<template>
  <div>
    <el-row>

      <el-col :span="24">

        <el-menu
          :default-active="routeName" 
          :router="true">

          <el-menu-item v-for="(menu, n) of menus" :key="n" :index="menu.name">
            <i :class="menu.icon"></i>
            <span slot="title">{{menu.text}}</span>
          </el-menu-item>

        </el-menu>

      </el-col>

    </el-row>
  </div>
</template>

<script>
import AsideMenuData from '../data/AppAsideMenu'
import store from '../store/index'

export default {

    data() {
      return {
        menus: []
      }
    },

    created() {
      this.menus = AsideMenuData;
    },

    computed: {
      routeName() {
        return this.$store.state.routeName;
      }
    }

}
</script>
